package com.winter.Controller;

import com.winter.service.HomeService;
import com.winter.util.Result;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("v1/home")
public class HomeController {

    @Autowired
    private HomeService homeService;

    /**
     * 首页新闻  10点前显示的是每日早餐，10点之后显示的是新闻资讯的
     */
    @GetMapping("msg")
    public Result homeMsg() {
        return homeService.homeMsg();
    }

    /**
     * 数据研究
     */
    @GetMapping("research")
    public Result research() {
        return homeService.research();
    }
}
